package com.erp.erp_entitys.ProductFjGysBak;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 
 * 产品部件-备选供应商
 */
public class ProductFjGysBakEntity implements Serializable {
    /**
     * 主键id
     */
    private Integer id;

    /**
     * 备选供应商编码
     */
    private String code;

    /**
     * 厂商货号 [原厂商货号，现改为：未含税FOB价格]
     */
    private String cshh;
    /**
     * 含税FOB价格
     */
    private String fob;
    /**
     * 采购币种
     */
    private String cgbz;

    /**
     * 采购成本 [原含税成本价，现改成：含税出厂价]
     */
    private String cgcb;

    /**
     * 未税成本价 [原未税成本价，现改成：未税出厂价]
     */
    private String catalog;

    /**
     * 产品编码
     */
    private String productCode;

    /**
     * 部件编码
     */
    private String fjCode;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createDate;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateDate;

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getFob() {
        return fob;
    }

    public void setFob(String fob) {
        this.fob = fob;
    }

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCshh() {
        return cshh;
    }

    public void setCshh(String cshh) {
        this.cshh = cshh;
    }

    public String getCgbz() {
        return cgbz;
    }

    public void setCgbz(String cgbz) {
        this.cgbz = cgbz;
    }

    public String getCgcb() {
        return cgcb;
    }

    public void setCgcb(String cgcb) {
        this.cgcb = cgcb;
    }

    public String getCatalog() {
        return catalog;
    }

    public void setCatalog(String catalog) {
        this.catalog = catalog;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getFjCode() {
        return fjCode;
    }

    public void setFjCode(String fjCode) {
        this.fjCode = fjCode;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProductFjGysBakEntity other = (ProductFjGysBakEntity) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getCshh() == null ? other.getCshh() == null : this.getCshh().equals(other.getCshh()))
            && (this.getCgbz() == null ? other.getCgbz() == null : this.getCgbz().equals(other.getCgbz()))
            && (this.getCgcb() == null ? other.getCgcb() == null : this.getCgcb().equals(other.getCgcb()))
            && (this.getCatalog() == null ? other.getCatalog() == null : this.getCatalog().equals(other.getCatalog()))
            && (this.getProductCode() == null ? other.getProductCode() == null : this.getProductCode().equals(other.getProductCode()))
            && (this.getFjCode() == null ? other.getFjCode() == null : this.getFjCode().equals(other.getFjCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getCshh() == null) ? 0 : getCshh().hashCode());
        result = prime * result + ((getCgbz() == null) ? 0 : getCgbz().hashCode());
        result = prime * result + ((getCgcb() == null) ? 0 : getCgcb().hashCode());
        result = prime * result + ((getCatalog() == null) ? 0 : getCatalog().hashCode());
        result = prime * result + ((getProductCode() == null) ? 0 : getProductCode().hashCode());
        result = prime * result + ((getFjCode() == null) ? 0 : getFjCode().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", code=").append(code);
        sb.append(", cshh=").append(cshh);
        sb.append(", cgbz=").append(cgbz);
        sb.append(", cgcb=").append(cgcb);
        sb.append(", catalog=").append(catalog);
        sb.append(", productCode=").append(productCode);
        sb.append(", fjCode=").append(fjCode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}